package com.epic.eventmgr.rest;

import com.epic.eventmgr.inter.IEvent;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Application {
    public static void main(String[] args) throws Exception {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-consumer.xml");
        context.start();
        System.out.println("start");
        IEvent demoService = (IEvent) context.getBean("eventService"); // 获取远程服务代理
        String hello = demoService.testEvent("world lkk"); // 执行远程方法
        System.out.println(hello); // 显示调用结果
        System.in.read();
    }
}
